package com.rightsidetech.mall.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class DetailSpecsNameReq implements Serializable {

    @ApiModelProperty(value = "规格名id",required = true)
    @NotNull(message = "id不可为空")
    @Min(value = 0,message = "规格id不可为负数")
    private Long id;

    @ApiModelProperty(value = "规格名",required = true)
    @NotBlank(message = "规格名不可为空")
    @Pattern(regexp = "[\\u4e00-\\u9fa5a-zA-Z0-9-./()【】]{0,20}+",message = "规格不允许特殊字符长度最大为20")
    private String specsName;
}
